package com.atguigu.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Map;

/**
 * Date:2020/9/29
 * Author:ybc
 * Description:
 */
@Controller
public class ViewController {

    @RequestMapping("/testForwardView")
    public String testForwardView(Map<String, Object> map){
        map.put("testView", "你好");
        return "success";
    }

    @RequestMapping("/testRedirectView")
    public String testRedirectView(Map<String, Object> map){
        map.put("testView", "你好");
        return "redirect:/rest.jsp";
    }

}
